Talk:ViewDeleted
Suggestions * I think a space is missing before the "content" link. * Can the preview modal be a bit bigger, like the one used to preview page edits? * When I tried to preview an image, script got stuck on "loading".leviathan_89 12:46, July 26, 2017 (UTC) :* I just added one. If you need more, just increase the left margin of .view-content-wrapper by a few pixels. :* Yes! You can now edit the width (and height, and all other properties of the modal) by changing ViewDeleted.modal. :*I'm aware, it should only happen when the file was a redirect before being deleted. If that's not the case, then please tell me more, preferably with a link to the image. -- Doru 19:10, July 26, 2017 (UTC) ::* Thank you! ::* Actually, I've tried to preview many images but none worked (examples: http://onepiece.wikia.com/wiki/Special:Log/delete, http://community.wikia.com/wiki/Special:Log/delete). I'm using chrome. ::* Something is not clear, when I restore a page using the link of your script, are all revisions restored by default? Or just the last one? (I have yet to try it). leviathan_89 20:07, July 26, 2017 (UTC) :::* Well, the part of "permanently loading" I'm not sure. Works fine for me (using Opera, which is really Chrome with a paintjob). Are you sure you're clicking the preview button? The image won't display on the first modal, only the actual wikitext on the file page will appear. http://imgur.com/mLWsnwM :::* Yes, it will restore all revisions, since it's usually very rare to restore selected revisions. -- Doru 22:46, July 26, 2017 (UTC) * I went ahead and found the same image you used in your example, this is what happens to me (for all files actually): http://imgur.com/d1UvjBU. I'm not sure what is causing it... I don't see anything unusual in the console either. * Another (minor) thing: if you try doing a query with the logs (like this) the script won't run. I believe that's because you used as condition "/delete" to be present in "wgPageName", however if someone do a query, wgPageName will be simply "Special:Log". I don't know how exactly, but maybe you should add as secondary condition something like ("wgCanonicalSpecialPageName = Log" AND "&type=delete in the url query"). leviathan_89 23:34, July 26, 2017 (UTC) :* Oh, that must be because it returns the wrong element when looking it up in the page. Since I can't piggyback your account, could you please run this script and post the result here? Don't worry, the sensitive stuff is redacted, but you can contact me in the if you've got doubts. $.get('/wiki/Special:Undelete?target=' + encodeURIComponent('File:Look.jpg'), function(page) { var $page = $(page), url = $page.find('#undelete'); console.log( url0.outerHTML .split(mw.user.tokens.get('editToken')).join('REDACTED') .replace(/token=.+?%5C/g, 'REDACTED') ); }); :* Implemented! I completely overlooked index.php. -- Doru 00:11, July 27, 2017 (UTC) Cancellazioni (mostra/nascondi) 21:05, 18 gen 2017 AmonFatalis (Discussione | contributi | blocca) ha cancellato la pagina File:Look.jpg (Clean-up) (visualizza/ripristina) Log delle soppressioni Il registro non contiene elementi corrispondenti alla ricerca. Recupera revisioni Per recuperare l'intera cronologia della pagina, lasciare tutte le caselle deselezionate e fare clic su Ripristina. Per effettuare un ripristino selettivo, selezionare le caselle corrispondenti alle revisioni da ripristinare e fare clic su Ripristina. Motivo: Elimina le limitazioni sulle revisioni ripristinate Cronologia della pagina (mostra/nascondi) (diff) 15:58, 11 gen 2014 . . AmonFatalis (Discussione | contributi | blocca) (vuota) Cronologia del file (mostra/nascondi) 15:58, 11 gen 2014 . . AmonFatalis (Discussione | contributi | blocca) 535 × 28 (11 716 byte) leviathan_89 01:11, July 27, 2017 (UTC) (mostra/nascondi) :That's our issue! I didn't foresee revision delete links getting in the way. . Oh, and sorry for not responding in chat, I got distracted :P -- Doru 01:54, July 27, 2017 (UTC) Space The space you added before is not present if there is also the deletion summary. leviathan_89 16:18, August 1, 2017 (UTC) : . I've got no idea why, but I can't find in the page history the edit in which I added the space. Did someone revdelete me? -- Doru 17:04, August 1, 2017 (UTC) ::I actually tried to look for that edit in order to fix it myself, but since I couldn't find it I posted here. leviathan_89 18:29, August 1, 2017 (UTC) Admin only Is this script admin only, i mean i can't see content button where i'm not an admin. [[User:Clash.Bikash|'Clash.Bikash']][[User_talk:Clash.Bikash|'Talk']] 20:18, November 26, 2017 (UTC) :Yes, it's role restricted for admins and content moderators. Some global groups too, but you shouldn't worry about those. -- Doru 20:22, November 26, 2017 (UTC) Image size The image quite often overflows the modal since it's much bigger. That can be fixed by adding some CSS like .view-content-image-preview { max-width: 700px; /* or whatever the modal's width is */ object-fit: contain; } I can use personal CSS for that, but can something like that be implemented in the script itself, maybe with the right width? leviathan_89 18:39, December 16, 2017 (UTC) :Added! Sorry for the delay, I hadn't noticed your post, and I don't use email so I didn't get the notification :P -- Doru 01:24, December 29, 2017 (UTC) ::Ty! I added the object-fit property, though, to maintain the image ratio. leviathan_89 12:45, December 29, 2017 (UTC)